home *** CD-ROM | disk | FTP | other *** search
- public class BatFlying extends Codex {
- private CodexActor bat = new CodexActor(((Codex)this).GetClassThing());
- private float _minTime;
- private float _maxTime;
- public static String[] _params = new String[]{"Min time;5", "Max time;25"};
-
- public void beginscene(int clientGuid, int captureID) {
- ((Codex)this).SetTimer((float)((double)this._minTime + Math.random() * (double)(this._maxTime - this._minTime)));
- }
-
- public BatFlying(float minTime, float maxTime) {
- if (minTime < 2.0F) {
- this._minTime = 2.0F;
- } else {
- this._minTime = minTime;
- }
-
- if (maxTime <= this._minTime) {
- this._maxTime = this._minTime + 5.0F;
- } else {
- this._maxTime = maxTime;
- }
-
- }
-
- public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
- this.bat.PlayMotionSetMode(17, false, 30.0F);
- ((Codex)this).SetTimer((float)((double)this._minTime + Math.random() * (double)(this._maxTime - this._minTime)));
- }
- }
-